﻿
#ifndef __conn_mgr_h__
#define __conn_mgr_h__

#include "packet_buffer.h"
#include "uart_client.h"

class CConnMgr : public EventHandler {
protected:
    CConnMgr();
    ~CConnMgr();

public:
    static CConnMgr *ins() {
        static CConnMgr stIns;
        return &stIns;
    }

    int init();    

protected:
    virtual int checkEvents();
    virtual int handleEvents();

private:
    int64_t          mLastStatusTime;
    IPacketBuffer   *mPacket;
    int64_t          mNextEventTime;    
    UartClient      *mUartMCU; // mcu
};

extern CConnMgr *g_objConnMgr;

#endif
